
export function comjs(app) {
	
	app.config.globalProperties.http = uniCloud.importObject('userinfo')
 

	app.config.globalProperties.shh = uni.getSystemInfoSync().statusBarHeight
	app.config.globalProperties.navto = (url) => {
		uni.navigateTo({
			url
		})
	}

	app.config.globalProperties.copy = (copy) => {
		uni.setClipboardData({
			data: copy,
			icon: "none",
			success: function() {
				console.log('success');
			}
		})
	}

	app.config.globalProperties.back = () => {
		if (getCurrentPages().length == 1) {
			uni.reLaunch({
				url: "/pages/index/index"
			})
		} else {
			uni.navigateBack()
		}
	}
}